import request from "@/utils/request";

// 获取文件上传的token
export const ossInfo = async (data: {}) => {
    return await request.get("/sxnf_biz/oss/info", data).then((res) => {
        return res;
    });
};

// 获取文件上传token之后操作--上传图片
export const uploadingMinIo = async (url: string, data = {}) => {
    return await request.uploadingMinIo(url, data).then((res) => {
        return res;
    });
};
/**
 *保存文件上传记录
 * @param data
 * @returns
 */
export const attachFile = async (data = {}) => {
    return await request.post("/sxnf_biz/m/attach_file", data).then((res) => {
        return res;
    });
};

// 修改用户信息
export const editorUserInfo = async (data = {}) => {
    return await request.post("/api/user/update", data).then((res) => {
        return res;
    });
};
/**
 *上传文件
 * @param data
 * @returns
 */
export const uploadingFile = async (data = {}) => {
    return await request.uploading("/sxnf_biz/oss/upload_minio", data).then((res) => {
        return res;
    });
};
